package com.kiwilss.aopdemo.startup

import android.content.Context
import android.util.Log
import com.kiwilss.aopdemo.utils.LogUtils
import com.rousetime.android_startup.AndroidStartup
import com.rousetime.android_startup.Startup

/**
 * @author : Administrator
 * e-mail : kiwilss@163.com
 * time   : 2021/02/04
 *  desc   :
 */
class SampleSecondStartup : AndroidStartup<Boolean>() {
    //是否在主线程执行
    override fun callCreateOnMainThread(): Boolean = false
    //主线程是否要等待
    override fun waitOnMainThread(): Boolean = false
    override fun create(context: Context): Boolean? {
        //模拟耗时任务
        Log.e("MMM","SampleSecondStartup")
        Thread.sleep(5000)
        return true
    }

    override fun dependencies(): List<Class<out Startup<*>>>? {
        return listOf(SampleFirstStartup::class.java)
    }


}